package online.chazi.bootplus.multiple.datasource;

import com.zaxxer.hikari.HikariConfig;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

/**
 * 说明：作者很懒，什么都没留下
 * Created by 叉子同学 on 2020-05-12 15:10
 */
public class BalanceDataSourceProperties extends DataSourceProperties {

    //负载均衡，权重，值越大权重越大请求越多
    private Integer balanceWeight;

    //目前只支持Hikari，没必要支持Druid了
    @NestedConfigurationProperty
    private HikariConfig hikari;

    public Integer getBalanceWeight() {
        return balanceWeight;
    }

    public void setBalanceWeight(Integer balanceWeight) {
        this.balanceWeight = balanceWeight;
    }

    public HikariConfig getHikari() {
        return hikari;
    }

    public void setHikari(HikariConfig hikari) {
        this.hikari = hikari;
    }

}
